import requests
import json
import pytest
from conf.Analysis_ini import Analysis_ini

# 创建 Analysis_ini 实例
address = Analysis_ini().get_path('host')
# 定义 pytest fixture
@pytest.fixture()
def login():
    url=f"{address}/api/front/login"
    headers = {"Content-Type": "application/json"}
    param ={
            "account": "18292417675",
            "password": "crmeb@123456"
        }
    print(url)
    response = requests.post(url, json=param, headers=headers)
    return json.loads(response.text)['data']['token']


